package main

import (
	"fmt"
	"time"
)

func main() {

	//定时任务,重复执行多次
	ticker := time.NewTicker(time.Second * 2)

	i := 0

	for  {

		time := <- ticker.C
		i++

		fmt.Println(time.Format("2006-01-02 15:04:05"),"ticker:::",i)

	}

}
